﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyVideoViewerLibrary
{
    public enum MPAARating
    {
        None,
        NotRated,
        G,
        PG,
        PG13,
        NC17,
        R
    }
    public class MoviesBusiness
    {
        public static IMoviesBusiness MoviesBL { get; set; }
        static MoviesBusiness()
        {
            switch (Settings.Default.MovieSource)
            {
                case MovieSource.MyMovies:
                    MoviesBL = new MyMovies.MyMoviesBusiness();
                    break;
                case MovieSource.EAX:
                    MoviesBL = new EAXMovies.EAXBusiness();
                    break;
                case MovieSource.MyMoviesXML:
                    MoviesBL = new MyMoviesXML.MyMoviesXMLBusiness();
                    break;
                default:
                    throw new Exception("Invalid movie source");
            }
        }
        public static string GetMPAARatingText(MPAARating rating)
        {
            switch (rating)
            {
                case MPAARating.None:
                    return "";
                case MPAARating.NotRated:
                    return "Not Rated";
                case MPAARating.G:
                    return "G";
                case MPAARating.PG:
                    return "PG";
                case MPAARating.PG13:
                    return "PG-13";
                case MPAARating.NC17:
                    return "NC-17";
                case MPAARating.R:
                    return "R";
                default:
                    return "";
            }
        }
    }
}
